home *** CD-ROM | disk | FTP | other *** search
-
-
-
- gggglllluuuuLLLLooooooookkkkAAAAtttt((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee gggglllluuuuLLLLooooooookkkkAAAAtttt((((3333GGGG))))
-
-
-
- NNNNAAAAMMMMEEEE
- gggglllluuuuLLLLooooooookkkkAAAAtttt - define a viewing transformation
-
-
- CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
- void gggglllluuuuLLLLooooooookkkkAAAAtttt( GLdouble _e_y_e_X,
- GLdouble _e_y_e_Y,
- GLdouble _e_y_e_Z,
- GLdouble _c_e_n_t_e_r_X,
- GLdouble _c_e_n_t_e_r_Y,
- GLdouble _c_e_n_t_e_r_Z,
- GLdouble _u_p_X,
- GLdouble _u_p_Y,
- GLdouble _u_p_Z )
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- _e_y_e_X, _e_y_e_Y, _e_y_e_Z
- Specifies the position of the eye point.
-
- _c_e_n_t_e_r_X, _c_e_n_t_e_r_Y, _c_e_n_t_e_r_Z
- Specifies the position of the reference point.
-
- _u_p_X, _u_p_Y, _u_p_Z Specifies the direction of the _u_p vector.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- gggglllluuuuLLLLooooooookkkkAAAAtttt creates a viewing matrix derived from an eye point, a reference
- point indicating the center of the scene, and an _U_P vector.
-
- The matrix maps the reference point to the negative _z axis and the eye
- point to the origin. When a typical projection matrix is used, the
- center of the scene therefore maps to the center of the viewport.
- Similarly, the direction described by the _U_P vector projected onto the
- viewing plane is mapped to the positive _y axis so that it points upward
- in the viewport. The _U_P vector must not be parallel to the line of sight
- from the eye point to the reference point.
-
- Let
-
-
- F = (||( centerZcenterYcenterX --- eyeZeyeYeyeX )||)
- Let _U_P be the vector (upX,upY,upZ).
-
- Then normalize as follows: f = ||F||F_____
-
- UP' = ||UP||UP______
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- gggglllluuuuLLLLooooooookkkkAAAAtttt((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee gggglllluuuuLLLLooooooookkkkAAAAtttt((((3333GGGG))))
-
-
-
- Finally, let s = f x UP', and u = s x f.
-
-
-
- M is then constructed as follows: M = (||||( 0-f[0]u[0]s[0] 0-f[1]u[1]s[1] 0-f[2]u[2]s[2] 1000 )||||)
- and gggglllluuuuLLLLooooooookkkkAAAAtttt is equivalent to
-
- glMultMatrixf(M);
- glTranslated (-eyex, -eyey, -eyez);
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ggggllllFFFFrrrruuuussssttttuuuummmm, gggglllluuuuPPPPeeeerrrrssssppppeeeeccccttttiiiivvvveeee
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-